<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@taglib prefix="s" uri="strutsTags"%>
<div id="dlgRejectComm" style="width:380px;" class="prompt_div_inline"> 	 
	<table width="100%">
		<tr>
			<s:textarea id="logComents_r" name="logComments_r" label="备注" cols="36" rows="6" onkeyup="if(this.value.length>255){this.value=this.value.substring(0, 255);}"/>	
		</tr>
		<tr id="errorinfoDiv">
			<td colspan="2" align="center"><label id="errorinfo" style="color:red;"></label></td>
		</tr>
		<tr>
			<td colspan="2" class="prompt_div_bottom">
				<input id="butionSub" class="button" type="button" onclick="batchReject();" value="提交">
				<input class="button" type="button" onclick="hrm.common.closeDialog('dlgRejectComm');" value="取消">
			</td>
		</tr>
	</table>
</div>
<script type="text/javascript" language="javascript">  
hrm.common.initDialog('dlgRejectComm');
function commonbatch(approveOper,logComment,beanComment,formId,actionName){       
    var comment=$('#'+logComment); 
    if( $('#'+approveOper).val() == "reject" && comment.val() == ""){        
        alert("拒绝时必须填写备注！");        
        return false;   
    }
    $('#'+beanComment).val(comment.val()); //备注信息填入表单
    var formElement=$('#'+formId).get(0); //获取当前第一个表单对象
    formElement.action = actionName; //js方式提交表单           
	formElement.submit(); 
    hrm.common.closeDialog('dlgRejectComm'); //common.js关闭dialog    
}     
</script>